<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<IEnumerable<AvansRS.Domain.EventDate>>" %>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">

    <h2>Index</h2>

    <table>
        <tr>
            <th>Name</th>
            <th>
              ForStudents
            </th>
            <th>
            AllowChanges
            </th>
            <th>
               Date
            </th>
            <th>
                Edit
            </th>
            <th>
                Details
            </th>
             <th>
                Delete
            </th>
        </tr>

    <% foreach (var item in Model) { %>
    
        <tr>
           
            <td>
                <%= Html.Encode(item.Event.Name) %>
            </td>
            <td>
                <%= Html.Encode(item.ForStudents) %>
            </td>
            <td>
                <%= Html.Encode(item.AllowChanges) %>
            </td>
            <td>
                <%= Html.Encode(String.Format("{0:g}", item.Date)) %>
            </td>
            
             <td>
                <%= Html.ActionLink("Edit", "EventDateEdit", new { id = item.ID })%> |
                <%= Html.ActionLink("Details", "EventDateDetails", new { id = item.ID })%> |
                <%= Html.ActionLink("Delete", "EventDateDelete", new { id = item.ID })%>
            </td>
            
        
        </tr>
    
    <% } %>

    </table>

    <p>
        <%= Html.ActionLink("Create New", "Create") %>
    </p>

</asp:Content>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>

